cmake_minimum_required(VERSION 2.8)
PROJECT(DNS)

IF(DEBUG)
  MESSAGE(STATUS "Adding Debug flag...")
  ADD_DEFINITIONS(-D_DEBUG -DDEBUG -O0 -g -ggdb)
  SET(CMAKE_BUILD_TYPE Debug)
  SET(BTYPE ${CMAKE_BUILD_TYPE})
  MESSAGE(STATUS "Build type is " ${CMAKE_BUILD_TYPE})
ELSE(DEBUG)
  MESSAGE(STATUS "Adding Release flag...")
  ADD_DEFINITIONS(-D_RELEASE -DRELEASE -O3)
  SET(CMAKE_BUILD_TYPE Release)
  SET(BTYPE ${CMAKE_BUILD_TYPE})
  MESSAGE(STATUS "Build type is " ${CMAKE_BUILD_TYPE})
ENDIF(DEBUG)
ADD_DEFINITIONS(-Wno-deprecated)

ADD_SUBDIRECTORY(dns)
ADD_SUBDIRECTORY(memtofile)
ADD_SUBDIRECTORY(delmem)
ADD_SUBDIRECTORY(deldbgshm)
